home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / alpha / modules / powerpc / tasksPPC.m < prev   
Encoding:
Text File  |  2002-10-28  |  3.9 KB  |  103 lines

  1. MODULE 'powerpc/portsPPC','utility/tagitem'
  2. /* private structure */
  3.  
  4. OBJECT TaskLink
  5.   Node:MinNode,
  6.   Task:APTR,
  7.   Sig:ULONG,
  8.   Used:UWORD
  9.  
  10. /* task structure for ppc. fields not commented are private*/
  11. OBJECT TaskPPC
  12.   Task:Task,                    /* exec task structure */
  13.   StackSize:ULONG,              /* stack size: read only */
  14.   StackMem:APTR,
  15.   ContextMem:APTR,
  16.   TaskPtr:APTR,
  17.   Flags:ULONG,                  /* flags (see below): read only */
  18.   Link:TaskLink,
  19.   BATStorage:APTR,
  20.   Core:ULONG,
  21.   TableLink:MinNode,
  22.   Table:APTR,                    /* task's page table: read only */
  23.   DebugData:ULONG,              /* free space for debuggers */
  24.   Pad:UWORD,
  25.   Timestamp:ULONG,
  26.   Timestamp2:ULONG,
  27.   Elapsed:ULONG,
  28.   Elapsed2:ULONG,
  29.   Totalelapsed:ULONG,
  30.   Quantum:ULONG,
  31.   Priority:ULONG,
  32.   Prioffset:ULONG,
  33.   PowerPCBase:APTR,
  34.   Desired:ULONG,
  35.   CPUusage:ULONG,               /* CPU usage: read only */
  36.   Busy:ULONG,                   /* busy time: read only */
  37.   Activity:ULONG,               /* activity: read only */
  38.   Id:ULONG,                     /* task ID: read only */
  39.   Nice:ULONG,                   /* NICE value: read only */
  40.   Msgport:PTR TO MsgPortPPC,    /* Msg port: read only */
  41.   TaskPools:List,               /* private: for V15-MM */
  42.   PoolMem:ULONG,                /* private: for V15-MM */
  43.   MessageRIP:PTR TO Message,    /* private */
  44.   ExcData:APTR                   /* private */
  45.  
  46. /* don't depend on sizeof(TaskPPC) */
  47. CONST NT_PPCTASK=100,
  48. /* tc_State (additional task states) */
  49.  TS_CHANGING=7
  50. /* tp_Flags */
  51. FLAG TASKPPC_SYSTEM=0,
  52.  TASKPPC_BAT=1,
  53.  TASKPPC_THROW=2,
  54.  TASKPPC_CHOWN=3,
  55.  TASKPPC_ATOMIC=4
  56. /* tags passed to CreateTaskPPC */
  57. #define TASKATTR_TAGS        (TAG_USER+$100000)
  58. #define TASKATTR_CODE        (TASKATTR_TAGS+0)    /* entry code */
  59. #define TASKATTR_EXITCODE    (TASKATTR_TAGS+1)    /* exit code */
  60. #define TASKATTR_NAME        (TASKATTR_TAGS+2)    /* task name */
  61. #define TASKATTR_PRI         (TASKATTR_TAGS+3)    /* task priority */
  62. #define TASKATTR_STACKSIZE   (TASKATTR_TAGS+4)    /* task stacksize */
  63. #define TASKATTR_R2          (TASKATTR_TAGS+5)    /* smalldata/TOC base */
  64. #define TASKATTR_R3          (TASKATTR_TAGS+6)    /* first parameter */
  65. #define TASKATTR_R4          (TASKATTR_TAGS+7)
  66. #define TASKATTR_R5          (TASKATTR_TAGS+8)
  67. #define TASKATTR_R6          (TASKATTR_TAGS+9)
  68. #define TASKATTR_R7          (TASKATTR_TAGS+10)
  69. #define TASKATTR_R8          (TASKATTR_TAGS+11)
  70. #define TASKATTR_R9          (TASKATTR_TAGS+12)
  71. #define TASKATTR_R10         (TASKATTR_TAGS+13)
  72. #define TASKATTR_SYSTEM      (TASKATTR_TAGS+14)   /* private */
  73. #define TASKATTR_MOTHERPRI   (TASKATTR_TAGS+15)   /* inherit mothers pri */
  74. #define TASKATTR_BAT         (TASKATTR_TAGS+16)   /* BAT MMU setup (BOOL) */
  75. #define TASKATTR_NICE        (TASKATTR_TAGS+18)   /* initial NICE value (-20..20)*/
  76. #define TASKATTR_INHERITR2   (TASKATTR_TAGS+19)   /* inherit r2 from parent task
  77.                                                    (overrides TASKATTR_R2) (V15+) */
  78. #define TASKATTR_ATOMIC      (TASKATTR_TAGS+20) /* noninterruptable task */
  79. #define TASKATTR_NOTIFYMSG   (TASKATTR_TAGS+21) /* notification upon task death (V16+) */
  80. /* taskptr structure */
  81.  
  82. OBJECT TaskPtr
  83.   Node:Node,
  84.   Task:APTR
  85.  
  86. /* return values of ChangeStack */
  87. ENUM CHSTACK_SUCCESS=-1,
  88.  CHSTACK_NOMEM,
  89. /* parameter to ChangeMMU */
  90.  CHMMU_STANDARD,
  91.  CHMMU_BAT
  92. /* tags passed to SnoopTask */
  93. #define SNOOP_TAGS           (TAG_USER+$103000)
  94. #define SNOOP_CODE           (SNOOP_TAGS+0)       /* pointer to callback function */
  95. #define SNOOP_DATA           (SNOOP_TAGS+1)       /* custom data, passed in r2 */
  96. #define SNOOP_TYPE           (SNOOP_TAGS+2)       /* snoop type (see below) */
  97. /* possible values of SNOOP_TYPE */
  98. ENUM SNOOP_START=1,                        /*monitor task start */
  99.  SNOOP_EXIT                        /*monitor task exit */
  100. /* possible values for the CreatorCPU parameter of the callback function */
  101. ENUM CREATOR_PPC=1,
  102.  CREATOR_68K
  103.